package com.lagou.demo.controller;

import com.lagou.edu.mvcframework.annotations.LagouController;
import com.lagou.edu.mvcframework.annotations.LagouRequestMapping;
import com.lagou.edu.mvcframework.annotations.Security;

@LagouController
@LagouRequestMapping("/security-demo1")
public class SecurityDemo1Controller {

    @Security("zhangsan")
    @LagouRequestMapping("/handle01")
    public String handle01(String username) {
        System.out.println("handle01");
        System.out.println("Username: " + username);
        return username;
    }

    @Security("lisi")
    @LagouRequestMapping("/handle02")
    public String handle02(String username) {
        System.out.println("handle02");
        System.out.println("Username: " + username);
        return username;
    }

    @Security({"zhangsan", "lisi"})
    @LagouRequestMapping("/handle03")
    public String handle03(String username) {
        System.out.println("handle03");
        System.out.println("Username: " + username);
        return username;
    }
}
